home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
asm
/
pc370_3.exe
/
lha
/
DEMOMVS.ALC
< prev
next >
Wrap
Text File
|
1987-06-06
|
7KB
|
229 lines
TITLE 'DEMOMVS - DEMO USE OF MVS SHELL TO SUPPORT MVS WTO'
*
* PGM-ID. DEMOMVS.ALC
* AUTHOR. DON HIGGINS
* DATE. 05/29/87
* REMARKS. THIS PROGRAM INVOKES MVS.MOD DYNAMICALLY LOADED SUBROUTINE
* TO ESTABLISH MVS SHELL AND THEN USES STANDARD MVS WTO AND
* WTOR SVC'S.
* MAINTENANCE.
*
* 05/30/87 CHANGE LOGIC FOR RETURN TO PC/370 SUPERVISOR STATE AT SVC 3
* 06/01/87 REMOVE PATH FOR MVS.MOD
* 06/02/87 ADD CHAINED CCW'S AND POINT ASSIST CHANNEL I/O TO CONSOLE
* 06/06/87 ADD DISPLAY OF TIMER RESULTS IN R1 VIA ABEND, ADD WTOR TEST
*
DEMOMVS CSECT
STM R14,R12,12(R13)
LR R12,R15
USING DEMOMVS,R12
LA R15,DEMOSAVE
ST R15,8(R13)
ST R13,4(R15)
LR R13,R15
LA R2,=C'DEMOMVS STARTED$'
SVC PCWTO
L R15,=V(PET)
BALR R14,R15 PRINT TIME AND DATE
LA R1,=C'MVS.MOD'
SVC PCLOAD
LTR R15,R15
BNZ ABEND
LR R15,R0
BALR R14,R15 IPL MVS AND RETRUN IN PROBLEM STATE
*
* TEST MVS WTO/WTOR SVC 35
*
BAL R1,WTO1
DC AL2(WTO1M-*,0),C'HELLO FROM MVS DEMO VIA WTO'
WTO1M EQU *
WTO1 DS 0H
SVC MVSWTO MVS WTO SVC 35
BAL R1,WTO2
DC AL2(WTO2M-*,0),C'HELLO AGAIN TO TEST SERIAL REUSE'
WTO2M EQU *
WTO2 DS 0H
SVC MVSWTO MVS WTO SVC 35
CNOP 0,4
WTORLOOP BAL R1,WTOR1
DC AL1(L'WTOR1RPY),AL3(WTOR1RPY),A(WTORECB)
DC AL2(WTOR1M-*,0),C'ENTER WTOR REPLY TO ECHO, END TO STOP'
WTOR1M EQU *
WTOR1 DS 0H
SVC MVSWTOR MVS WTOR SVC 35
LA R3,20
WTOLOOP EQU * WTO SCREEN OF MSGS WHILE WAITING
BAL R1,WTO2A
DC AL2(WTO2AM-*,0),C'FILL SCREEN WHILE WTOR OUTSTANDING'
WTO2AM EQU *
WTO2A DS 0H
SVC MVSWTO MVS WTO SVC 35
BCT R3,WTOLOOP
LA R1,WTORECB
SVC MVSWAIT
CLC WTOR1RPY,=C'END'
BE WTOREND
BAL R1,WTO3
DC AL2(WTO3M-*,0),C'REPLY WAS '
WTOR1RPY DC C'XXX'
WTO3M EQU *
WTO3 DS 0H
SVC MVSWTO MVS WTO SVC 35
B WTORLOOP
WTORECB DC F'0'
WTOREND EQU *
*
* TEST MVS GMAINR/FMAINR SVC 10
*
BAL R1,WTO4
DC AL2(WTO4M-*,0),C'TEST MVS GETMAIN/FREEMAIN STARTING'
WTO4M EQU *
WTO4 DS 0H
SVC MVSWTO MVS WTO SVC 35
LA R4,X'104'
USING ASCB,R4
L R2,ASCASF SAVE FQE PTR FOR CHECK
LA R0,16
LCR R1,R0 R1 = NEG. FOR GMAIN
SVC MVSGMAIN MVS GETMAIN SVC 10
CLR R1,R2
BNE ERR DID WE GET FIRST 16
LA R3,16(R2)
CL R3,ASCASF DOES FQE NOT POINT TO REMAINING
BNE ERR
SVC MVSFMAIN MVS FREEMAIN SVC 10
CL R2,ASCASF IS FQE BACK TO ORIG.
BNE ERR
*
* TEST MVS ABEND SVC 13 WITH/WITHOUT FORMATTTED DUMP OPTION
*
BAL R1,WTO5
DC AL2(WTO5M-*,0),C'TEST MVS ABEND WITHOUT/WITH DUMP'
WTO5M EQU *
WTO5 DS 0H
SVC MVSWTO MVS WTO SVC 35
L R1,=X'00122000' SYSTEM ABEND 122
SVC MVSABEND
L R1,=X'80000333' USER ABEND 333 WITH DUMP
SVC MVSABEND
*
* TEST MVS TIMER SVC 11
*
BAL R1,WTO6
DC AL2(WTO6M-*,0),C'TEST TIMER R1=0.01 SEC/HHMMSSTH'
WTO6M EQU *
WTO6 DS 0H
SVC MVSWTO MVS WTO SVC 35
LA R1,X'01' REQ. TOD IN 0.01 SEC
SVC MVSTIME MVS TIME SVC 11
LR R1,R0
SVC MVSABEND USE ABEND TO DISPLAY R1 0.01 SEC TIME
LA R1,X'02'
SVC MVSTIME
LR R1,R0
SVC MVSABEND USE ABEND TO DISPLAY R1 PACKED HHMMSSTH
*
* TEST MACRO CODE FOR SIO (INS0156.MOD) TO SIMULATE CHANNEL TO X'01F' CONSOLE
*
BAL R1,WTO7
DC AL2(WTO7M-*,0),C'TEST MVS SIO SIMULATOR STARTING'
WTO7M EQU *
WTO7 DS 0H
SVC MVSWTO MVS WTO SVC 35
XFILI =C'CON:' REDIRECT ASSIST (SIMULATED CHANNEL I/O) TO CON:
XFILO =C'CON:'
LA R0,SIOCCW1
ST R0,CAW
SIO X'01F'
CLC CSW+4(4),=X'0D000050' CE,DE,UE, NO DATA READ AT EOF
BNE ERR
LA R0,SIOCCW2
ST R0,CAW
SIO X'01F'
CLC CSW+4(4),=X'0C000000' CE,DE, 0 RESID.
BNE ERR
*
* EXIT MVS MODE TO SUPR. STATE AND EXIT PC/370 TO MS-DOS
*
SVC MVSEXIT RETRUN TO SUPR. STATE
LA R2,=C'END OF DEMOMVS$'
SVC PCWTO
L R13,4(R13) RESTORE SAVE
LM R14,R12,12(R13) RESTORE REGS
BR R14 EXIT TO PC/370 DETACH SVC
ABEND EQU * MVS EXIT SVC
SVC MVSEXIT RETURN TO SUPR. STATE
SVC PCTRACE
DC C'106'
SVC PCTRACE
DC C'BUG'
B ABEND
ERR EQU *
SVC MVSEXIT RETURN TO SUPR. STATE
SVC PCTRACE
DC C'800'
SVC PCTRACE
DC C'BUG'
B ERR
SIOCCW1 CCW CCWRITE,SIOMSG1,X'40',L'SIOMSG1 HELLO
SIOCCW1L CCW CCWRITE,SIOMSG2,X'40',L'SIOMSG2 ENTER TEXT TO ECHO
CCW CCREAD,SIOREAD,X'40',L'SIOREAD READ TEXT
CCW CCWRITE,SIOREAD-1,X'40',L'SIOREAD+1 ECHO TEXT
CCW CCTIC,SIOCCW1L,X'00',0
SIOCCW2 CCW CCWRITE,SIOMSG3,X'00',L'SIOMSG3 THATS ALL
SIOMSG1 DC C' HELLO FROM SIO CCW READ/WRITE LOOP'
SIOMSG2 DC C' ENTER TEXT TO ECHO OR ESC TO END'
SIOMSG3 DC C' DEVICE END DETECTED'
DC C' ' CARRIAGE CONTROL FOR WRITE CCW
SIOREAD DC CL80' '
DEMOSAVE DC 18F'0'
R0 EQU 0
R1 EQU 1
R2 EQU 2
R3 EQU 3
R4 EQU 4
R12 EQU 12
R13 EQU 13
R14 EQU 14
R15 EQU 15
PCTRACE EQU 9 PC/370 TRACE
PCLOAD EQU 25 PC/370 LOAD MODULE
PCWTO EQU 200+9 PC/370 WTO VIA MS-DOS SVC 9
MVSWAIT EQU 1 MVS WAIT FOR ECB POST VIA EXT. INT.
MVSPOST EQU 2 MVS POST ECB
MVSEXIT EQU 3 MVS EXIT TO PC/370 SUPERVISOR STATE
MVSGMAIN EQU 10 MVS GETMAIN
MVSFMAIN EQU 10 MVS FREEMAIN
MVSTIME EQU 11 MVS TIME OF DAY IN R0
MVSABEND EQU 13 MVS ABEND WITH CMP CODE IN R1
MVSWTO EQU 35 MVS WTO
MVSWTOR EQU 35 MVS WTOR
CSW EQU X'40' CHANNEL STATUS WORD
CAW EQU X'48' CHANNEL ADDRESS WORD
CCWRITE EQU X'01' WRITE DATA FROM MEMORY TO CHANNEL
CCREAD EQU X'02' READ DATA FROM CHANNEL TO MEMORY
CCTIC EQU X'08' TRANSFER IN CHANNEL TO NEW CCW
*********************************************************************
*
* ASCB - ADDRESS SPACE CONTROL BLOCK FOR PC/370 RELEASE 2.0+
*
*********************************************************************
*
* THIS CONTROL BLOCK IS INITIALIZED BY THE PC/370 EMULATOR AT EXECUTION
* TIME FOR THE MAIN PROGRAM COM FILE AND IS LOCATED AT VIRTUAL MEMORY
* ADDRESS X'104'. THIS CONTROL BLOCK IS ALSO CREATED FOR EACH ATTACHED
* COM PROGRAM ADDRESS SPACE DURING ATTACH SVC 26 EXECUTION (SEE SVC.DOC).
*
*********************************************************************
ASCB DSECT
ASCIDR DS CL4 ASCB IDENTIFIER C'ASCB'
ASCNXT DS A ABSOLUTE ADDRESS OF NEXT DAUGHTER TASK ASCB
ASCPRV DS A ABSOLUTE ADDRESS OF PREVIOUS MOTHER TASK ASCB
ASCASO DS A ABSOLUTE ADDRESS OF ADDRESS SPACE ORIGIN
ASCASL DS F LENGTH OF ADDRESS SPACE (USED FOR ADDRESS PROTECTION)
ASCASF DS A RELATIVE ADDRESS OF FIRST FREE QUEUE ELEMENT (FQE)
ASCENT DS A RELATIVE ADDRESS OF ENTRY POINT (FROM COM PREFIX)
ASCEXT DS A RELATIVE ADDRESS OF RETURN IN MOTHER TASK ASCB
LASCB EQU *-ASCB
END DEMOMVS